package edu.ynu.se.xiecheng.achitectureclass.entity;

import edu.ynu.se.xiecheng.achitectureclass.common.entity.LogicEntity;
import lombok.Data;
import org.hibernate.annotations.CreationTimestamp;
import javax.persistence.*;
import java.util.Date;

@Data
@Entity
@Table(name = "camera_data")
public class CameraData extends LogicEntity {
    @ManyToOne
    @JoinColumn(name = "device_id", nullable = false)
    private Device device;  // 所属设备
    
    @Column(name = "photo_url", nullable = false)
    private String photoUrl;  // 照片URL
    
    @Column(name = "create_time", nullable = false)
    @CreationTimestamp
    private Date createTime;  // 创建时间
} 